package com.carkeeper.shop.controller;

import com.carkeeper.car.Itcast;
import com.carkeeper.car.feign.ItcastFeign;
import com.carkeeper.common.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class TestController {

    @Autowired
    private ItcastFeign itcastFeign;

    @GetMapping("/itcast/{id}")
    public Result<Itcast> findItcastById(@PathVariable Integer id) {
        return itcastFeign.findById(id);
    }
}
